<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1>要求;页面上三个连接:淘宝,京东,拼多多</h1>
		<h3>要求是使用js访问</h3>
		<div>
			<a href="http://www.taobao.com" target="_blank">淘宝</a>
			<a href="http://www.jd.com" target="_blank">京东</a>
			<a href="http://www.pinduoduo.com" target="_blank">拼多多</a>
		</div>
		
		<script type="text/javascript">
			//获取a标签lementByTagName();
			document.getElementsByTagName("a");
			document.getElementsByTagName("a")[0].href;
			alert(document.getElementsByTagName("a")[0].href)
			
			
			console.log(document.getElementsByTagName("a"));
			console.log(document.getElementsByTagName("a")[0].href);
			console.log(document.getElementsByTagName("a")[0].innerText);
			
			console.log(document.getElementsByTagName("a"));
			console.log(document.getElementsByTagName("a")[1].href);
			console.log(document.getElementsByTagName("a")[1].innerText);
			
		</script>
		
		
	</body>
</html>
